package com.brillilab.domain.enums.kit;

import com.brillilab.domain.enums.base.BaseEnum;
import com.brillilab.domain.enums.lab.LabEnum.State;

public class KitEnum {

	/**
     * 分类：1-试剂，2-样品
     */
    public static enum Classify implements BaseEnum<State, Integer> {
    	REAGENT("试剂", 1), SAMPLE("样品", 2);
        public String key;
        private Integer value;

        private Classify(String key, Integer value) {
            this.key = key;
            this.value = value;
        }

        public String getKey() {
            return key;
        }

        public static String getKey(Integer value) {
            for (Classify p : Classify.values()) {
                if (p.getValue().equals(value)) {
                    return p.key;
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }
    }
    
    /**
     * kit类型:0-单成分，1-多成分
     */
    public static enum KitType implements BaseEnum<State, Integer> {
    	ONE("单成分", 0), MORE("多成分", 1);
        public String key;
        private Integer value;

        private KitType(String key, Integer value) {
            this.key = key;
            this.value = value;
        }

        public String getKey() {
            return key;
        }

        public static String getKey(Integer value) {
            for (KitType p : KitType.values()) {
                if (p.getValue().equals(value)) {
                    return p.key;
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }

    }

    /**
     * kit类型:0-单成分，1-多成分
     */
    public static enum IsDelete implements BaseEnum<State, Integer> {
        NOT("否", 0), YES("是", 1);
        public String key;
        private Integer value;

        private IsDelete(String key, Integer value) {
            this.key = key;
            this.value = value;
        }

        public String getKey() {
            return key;
        }

        public static String getKey(Integer value) {
            for (KitType p : KitType.values()) {
                if (p.getValue().equals(value)) {
                    return p.key;
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }

    }
}
